#include "MemoryObject.h"
#include "../Memory/MemoryManager.h"

using namespace Stray;
using namespace Stray::Core;

void* MemoryObject::operator new(size_t size)
{
	return Core::MemoryManager::getInstance().generalAllocate(size);
}

void* MemoryObject::operator new(size_t size, void* p)
{
	return ::operator new(size, p);
}

void MemoryObject::operator delete(void* p)
{
	Core::MemoryManager::getInstance().generalDeallocate(p);
}

void MemoryObject::operator delete(void* p, void* arg)
{
	::operator delete(p, arg);
} 

void* MemoryObject::operator new[](size_t size)
{
	return ::operator new[](size);
}

void MemoryObject::operator delete[](void* p)
{
	::operator delete[](p);
}